//
//  RAFSUSimCardModel.m
//  RAFSUManagement
//
//  Created by Piccolo on 22/03/2018.
//  Copyright © 2018 Rayonics. All rights reserved.
//

#import "RAFSUSimCardModel.h"

@implementation RAFSUSimCardModel

- (instancetype)initNoNull {
    self = [super init];
    if (self) {
        _IMEI = @"";
        _IMSI = @"";
        _RSRQ = @"";
        _signalPower = @"";
        _SINR = @"";
    }
    return self;
}

- (instancetype)initWithFsuSdkSimCardInfoDic:(NSDictionary *)simCardInfoDic {
    self = [super init];
    if (self) {
        if ([RAUtil isExistDic:simCardInfoDic key:nil]) {
            _IMEI = [RAUtil noNullString:simCardInfoDic[@"fsu_sim_card_info_imei"]];
            _IMSI = [RAUtil noNullString:simCardInfoDic[@"fsu_sim_card_info_imsi"]];
            _RSRQ = [RAUtil noNullString:simCardInfoDic[@"fsu_sim_card_info_rsrq"]];
            _signalPower = [RAUtil noNullString:simCardInfoDic[@"fsu_sim_card_info_signal_power"]];
            _SINR = [RAUtil noNullString:simCardInfoDic[@"fsu_sim_card_info_sinr"]];
        }
    }
    return self;
}

- (instancetype)initWithFsuNetWorkResponseDic:(NSDictionary *)responseFsuDic {
    self = [super init];
    if (self) {
        if ([RAUtil isExistDic:responseFsuDic key:nil]) {
            _IMEI = [RAUtil noNullString:responseFsuDic[@"imei"]];
            _IMSI = [RAUtil noNullString:responseFsuDic[@"imsi"]];
            _SINR = [RAUtil noNullString:responseFsuDic[@"sinr"]];
            _RSRQ = [RAUtil noNullString:responseFsuDic[@"rsrq"]];
            _signalPower = [RAUtil noNullString:responseFsuDic[@"signalPower"]];
        }
    }
    return self;
}

@end
